<form class="layui-form layui-card" data-table-id="MenuTable" action="{:sysuri()}" data-auto="true" onSubmit="return false" method="post">

    <div class="layui-card-body">

        <div class="layui-form-item">
            <label class="layui-form-label"><span class="color-red">*</span>老师分类</label>
            <div class="layui-input-block">
                <select class="layui-select" required name="parent_id" lay-search>
                    {volist name="cate_list" id="cat"} 
                        <option value="{$cat.id}" {if isset($vo.parent_id) && $vo.parent_id == $cat.id} selected {/if}>{$cat.name}</option>
                    {/volist}
                </select>
            </div>
        </div>

        <div class="layui-form-item">
            <label class="layui-form-label"><span class="color-red">*</span>老师名称</label>
            <div class="layui-input-block">
                <input name="title" value='{$vo.name|default=""}'  lay-verify="required" placeholder="请输入姓名" class="layui-input">
            </div>
        </div>

        <div class="layui-form-item">
            <label class="layui-form-label"><span class="color-red">*</span>老师联系方式</label>
            <div class="layui-input-block">
                <input name="phone" value='{$vo.phone|default=""}'  lay-verify="required" placeholder="请输入联系方式" class="layui-input">
            </div>
        </div>

        <div class="layui-form-item">
            <label class="layui-form-label">绑定用户</label>
            <div class="layui-input-block">
                <select class="layui-select" required name="userid" lay-search>
                    {volist name="user_list" id="user"} 
                        <option value="{$user.id}" {if isset($vo.userid) && $vo.userid == $user.id} selected {/if}>{$user.name}</option>
                    {/volist}
                </select>
            </div>
        </div>
            
        <div class="layui-form-item" >
            <label class="layui-form-label">头像</label>
            <div class="layui-input-block">
                <table class="layui-table layui-col-xs6">
                    <thead>
                    <tr>
                        <th class="text-center">上传图片</th>
                    </tr>
                    <tr>
                        <td width="90px" class="text-center"><input name="image_path" type="hidden" value="{$vo.image_path|default=''}"></td>
                    </tr>
                    </thead>
                </table>
                <script>$('[name="image_path"]').uploadOneImage()</script>
            </div>

        </div>
        
        <div class="layui-form-item">
            <label class="layui-form-label">联系人</label>
            <div class="layui-input-block">
                <input name="username" value='{$vo.username|default=""}'  lay-verify="required" placeholder="请输入联系人" class="layui-input">
            </div>
        </div>

   

        

        <div class="layui-form-item layui-form-text">
            <label class="layui-form-label">简介</label>
            <div class="layui-input-block">
              <textarea placeholder="请输入内容" name="zhuying" class="layui-textarea">{$vo.zhuying|default=''}</textarea>
            </div>
        </div>



 

     



    </div>

    <div class="hr-line-dashed"></div>
    {notempty name='vo.id'}<input type='hidden' value='{$vo.id}' name='id'>{/notempty}

    <div class="layui-form-item text-center">
        <button class="layui-btn" lay-submit type='submit'>保存数据</button>
        <button class="layui-btn layui-btn-danger" type='button' data-confirm="确定要取消编辑吗？" data-close>取消编辑</button>
    </div>
</form>

{block name='script'}
<script>
    layui.use(['form', 'laydate'], function(){
    var form = layui.form;
    var laydate = layui.laydate;
    var $ = layui.$;



});


</script>
{/block}
